package gui.frame;

import gui.panel.MainPanel;
import gui.panel.SpendPanel;
import util.CenterPanel;

import javax.swing.*;

public class MainFrame extends JFrame {
    public static MainFrame instance = new MainFrame();
    //private static CenterPanel cp;

    private MainFrame() {
        //cp = new CenterPanel(0.75);


        this.setSize(500,450);
        this.setTitle("hububill");
        this.setContentPane(MainPanel.instance);
        this.setLocationRelativeTo(null);//窗口居中
        this.setResizable(false);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        instance.setVisible(true);
        //cp.show(new JButton("hello"));
        MainPanel.instance.workingPanel.show(SpendPanel.instance);
    }
}
